package kr.hkit.myframework.db;

import org.apache.log4j.Logger;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

public class DbUtil {

	private static final Logger logger = Logger.getLogger(DbUtil.class);

	public static void close(PreparedStatement pstmt){
		if (pstmt != null){
			try {
				pstmt.close();
			} catch (SQLException e) {
				System.err.print(e);
			} finally {
				pstmt = null;
			}
		}
	}
	
	public static void close(ResultSet rs){
		if (rs != null){
			try {
				rs.close();
			} catch (SQLException e) {
				System.err.print(e);
			} finally {
				rs = null;
			}
		}
	}
	
}
